package main.java.com.study.collection;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by .
 */
public class contains {
    public static void main(String[] args) {

        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        Set<Integer> set = new HashSet<>(list);

        for (Integer id:set) {
            set.contains(id);
            System.out.println(set.contains(id));
        }

    }
}
